import request from '@/utils/request'
/**
 * 接口
 */
export default {

 
    //1 根据课程id获取章节和小节数据列表
    getAllChapterVideo(courseId) {
        return request({
            url: '/eduservice/edu-chapter/getChapterVideo/'+courseId,
            method: 'get'
          })
    },

    //2 添加章节
    addChapter(chapter) {
        return request({
            url: '/eduservice/edu-chapter/addChapter',
            method: 'post',
            data:chapter
          })
    },
    //3 根据ID 查询章节
    getChapter(chapterId) {
        return request({
            url: '/eduservice/edu-chapter/getChapterInfo/'+chapterId,
            method: 'get',
          })
    },
    //4 修改章节 
    updateChapter(chapter) {
        return request({
            url: '/eduservice/edu-chapter/updateChapter',
            method: 'post',
            data:chapter
          })
    },
    //5 删除 deleteChapter
    deleteChapter(chapterId) {
        return request({
            url: '/eduservice/edu-chapter/deleteChapter/'+chapterId,
            method: 'delete',
          })
    },



}

